/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.feerepository.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Tree;
import org.feerepository.client.components.AppMenu;
import org.feerepository.client.components.MyImages;
import org.feerepository.client.constants.AppConstants;

public class ApplicationComponentFactory
{
    private static AppConstants constants;
    private static MyImages images;

    public static Tree getMainMenu()
    {
        return new AppMenu();
    }

    public static Hyperlink getHiperlink(String text)
    {
        Hyperlink link = new Hyperlink(text,"");
      //   link.setStyleName("Application-links");
        return link;
    }

    public static AppConstants getConstantsSet()
    {
        if(constants == null)
            constants = (AppConstants) GWT.create(AppConstants.class);
        return constants;
    }

    public static MyImages getApplicationImages()
    {
        if (images == null )
            images = (MyImages) GWT.create(MyImages.class);
        return images;
    }

    public static TextBox getSearchBox()
    {
        TextBox box = new TextBox();
        box.setStyleName("search_txt");
        return box;
    }

    public static Button getButton(String text)
    {
        Button but = new Button(text);
       // but.addStyleName("searchButton");
        return but;
    }
}
